@layout("../../../common/_body.html",{js:["/modular/sys/user/menu_edit.js"]}){
<div class="col-md-12">
    <div class="card">
        <div class="card-header">
            <h4>用户添加</h4>
        </div>
        <div class="card-body">
            <form class="form-horizontal" id="form">
                <input type="hidden" id="id" name="id" value="${user.id}"/>
                <div class="form-group">
                    <label class="col-xs-12" for="userNick">用户昵称</label>
                    <div class="col-xs-12">
                        <input class="form-control" type="text" id="userNick" name="userNick" value="${user.userNick}" placeholder="请输入用户名称.."
                               required="required">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12" for="userName">用户账号</label>
                    <div class="col-xs-12">
                        <input class="form-control" type="text" id="userName" name="userName" value="${user.userName}" placeholder="请选择父级菜单.." required="required">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12" for="userPassword">用户密码</label>
                    <div class="col-xs-12">
                        <input class="form-control" type="password" id="userPassword" name="userPassword" value="${user.userPassword}" placeholder="请输入用户密码.." required="required">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12" for="userEmail">用户邮箱</label>
                    <div class="col-xs-12">
                        <input class="form-control" type="text" id="userEmail" name="userEmail" value="${user.userEmail}" placeholder="请输入用户邮箱.."
                               required="required">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12" for="userMobile">用户电话</label>
                    <div class="col-xs-12">
                        <input class="form-control" type="text" id="userMobile" name="userMobile" value="${user.userMobile}" placeholder="请输入用户电话.."
                               required="required">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12" for="userSex">用户性别</label>
                    <div class="col-xs-6">
                        <select class="form-control select2" id="userSex" name="userSex" required="required">
                            <option>请选择</option>
                            <option value="1">男</option>
                            <option value="2">女</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-12">
                        <button class="btn btn-primary" type="button" id="submit">提交</button>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>
@}
<script>
    $("#userSex").select2("val","${user.userSex}");
</script>